package ntd.remote.link;

import cn.hutool.log.StaticLog;
import ntd.action.ActionAbs;
import ntd.action.bo.ActionInfo;
import ntd.action.bo.ActionOutBo;
import ntd.remote.link.bo.MsgBO;

public class ActionHeartbeatPacket extends ActionAbs {

    public static final String ACTION_NETTY_HEARTBEAT_PACKET = "action-netty-heartbeat-packet";

    @Override
    public ActionInfo info() {
        return new ActionInfo("netty 心跳包处理程序", ACTION_NETTY_HEARTBEAT_PACKET, this);
    }

    @Override
    public ActionOutBo handle() {
        MsgBO msgBO = actionInBo.getData().toBean(MsgBO.class);

        StaticLog.info("netty 心跳包[{}]", msgBO.getNetCode());
        return new ActionOutBo();
    }
}
